<template>
  <div class="mb70 container min-height">
    <p class="bread">
      <a href="#/index/lawyer-audit" class="font-s-18">律师年检</a> >
      <a href="javascript:void(0);" class="font-s-16">详情</a>
    </p>
    <div  class="bg-c-fff box-border">
      <h2 class="box-title rel">律师年检>详情</a>></h2>
      <form @submit.prevent="onSubmitBtn">
          <ul>
            <li>
              <span>律师姓名：</span>
              <p class="dib p">{{roleName}}</p>
            </li>
            <li>
              <span>所属律所：</span>
              <p class="dib p">{{yearly}}</p>
            </li>
            <li>
              <span>律师个人信息：</span>
              <div class="preview-box">
                <div class="preview" v-if="lawyerInfoUrl===''">
                  <div class="db auto tc">待上传</div>
                </div>
                <div class="preview-img" v-else>
                  <img :src="lawyerInfoUrl">
                </div>
              </div>
            </li>
            <li>
              <span>律师年检信息：</span>
              <div class="preview-box">
                <div class="preview" v-if="lawyerYearUrl===''">
                  <div class="db auto tc">待上传</div>
                </div>
                <div class="preview-img" v-else>
                  <img :src="lawyerYearUrl">
                </div>
              </div>
            </li>
          </ul>
      </form>
    </div>
  </div>
</template>
<script type="text/javascript">
import UploaderManager from '../components/UploaderManager'
export default {
  components: {
    UploaderManager
  },
  data() {
    return {
      roleName: '',
      abstract: '',
      yearly: '',
      lawyerInfoUrl: '',
      lawyerYearUrl: ''
    }
  },
  mounted() {
    this.getLawDetails()
  },
  methods: {
    getLawDetails() {
      this.$http.get('/memberLawyer/query/lawyerInfoById', {
        params: {
          id: this.$route.query.id
        }
      }).then(data => {
        if (data.data.httpCode === 200) {
          this.roleName = data.data.data.lawyerName
          this.yearly = data.data.data.lawyerName
          this.lawyerInfoUrl = data.data.data.lawyerInfoPic
          this.lawyerYearUrl = data.data.data.lawyerYearPic
        } else {
          this.$toasted.show(data.data.msg)
        }
      }).catch(err => {
        console.log(err)
        this.$toasted.show('网络错误')
      })
    }
  }
}

</script>
<style type="text/css" scoped>
.container {
  margin-top: 20px;
}

.min-height {
  min-height: 507px;
}

.box-title a {
  color: #a5a5a5;
}

ul {
  padding: 0 0 70px 190px;
}

ul li {
  padding: 10px 0;
}

ul li span {
  width: 194px;
  display: inline-block;
  text-align: right;
  color: #666666;
  margin-right: 20px;
}

textarea {
  width: 350px;
  height: 140px;
  padding: 10px;
}

button {
  margin-right: 45px;
}

.lawyer-info ul {
  padding-bottom: 70px;
}

.lawyer-info ul li {
  padding: 10px 0;
}

.lawyer-info ul li span {
  width: 194px;
  display: inline-block;
  text-align: right;
  color: #666666;
  margin-right: 20px;
}

select {
  width: 121px;
  height: 35px;
}

.remark {
  width: 403px;
  color: #a5a5a5;
}

.upload-css {
  background-color: #888888;
  border: 1px solid #2a508c;
  width: 121px;
  height: 40px;
  color: #000000;
  cursor: pointer;
}

.upload-btn {
  left: -154px;
  top: 0;
  cursor: pointer;
  width: 151px;
}

.icon-asterisk {
  position: relative;
  right: 35px;
  color: #ec5303;
  font-size: 25px;
  top: 3px;
}

.preview-box {
  margin-left: 217px;
  margin-top: 10px;
}

.preview {
  width: 120px;
  height: 120px;
  border: 1px solid #cccccc;
  margin-right: 70px;
}

.input-w1 {
  width: 385px;
}

.p {
  color: #666;
}

.preview div {
  width: 100px;
  height: 100px;
  border-radius: 100%;
  border: 1px solid #cccccc;
  margin-top: 10px;
  line-height: 100px;
  color: #ccc;
}

.preview-img {
  width: 300px;
}

.preview-img img {
  width: 150px;
  height: auto;
}

.button button {
  width: 150px;
  line-height: 35px;
  margin-right: 25px;
}


textarea {
  width: 380px;
  height: 230px;
  padding: 10px 8px;
}

input::-webkit-input-placeholder {
  color: #a5a5a5;
}
</style>
